package com.kx.service_exam.service.interfaces;

import com.github.pagehelper.PageInfo;
import com.kx.service_exam.common.service.IBaseSV;
import com.kx.service_exam.model.QuestionInfo;
import com.kx.service_exam.model.QuestionInfoDetail;
import com.kx.service_exam.model.QuestionInfoExample;
import com.kx.service_exam.vo.query.QuestionInfoQueryVO;
import org.springframework.transaction.annotation.Transactional;

import java.text.ParseException;
import java.util.List;

public interface IQuestionInfoSV extends IBaseSV<QuestionInfoExample,QuestionInfoQueryVO> {

    /**
     * 新增记录
     * @param questionInfo
     * @return
     */
    int insertQuestionInfo(QuestionInfo questionInfo);

    @Transactional
    boolean addQuestionInfoDetail(QuestionInfoDetail questionInfoDetail, String operatorId);

    boolean logicalDeleteQuestionInfoDetailById(String id, String operatorId);

    int deleteQuestionInfo(String id);

    boolean deleteQuestionInfoDetailById(String id);

    int updateQuestionInfo(QuestionInfo questionInfo);

    QuestionInfo selectQuestionInfoById(String id);

    long countQuestionInfoByFilter(QuestionInfoQueryVO filter) throws ParseException;

    long countQuestionInfoByExamModuleId(String examModuleId) throws ParseException;

    List<QuestionInfo> lisQuestionInfoByFilter(QuestionInfoQueryVO filter) throws ParseException;

    List<QuestionInfo> listQuestionInfoByExamModuleId(String examModuleId) throws ParseException;

    PageInfo<QuestionInfo> pageQuestionInfoByFilter(QuestionInfoQueryVO filter) throws ParseException;

    List<QuestionInfoDetail> listQuestionInfoDetail(QuestionInfoQueryVO filter) throws ParseException;

    QuestionInfoDetail selectQuestionInfoDetailById(String id) throws ParseException;
}
